package fr.univsavoie.tatiana2dvisualisation;

import org.eclipse.draw2d.IFigure;

import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.editparts.AbstractGraphicalEditPart;

public class EyeTrackerEventPart extends AbstractGraphicalEditPart {

	EyeTrackerEvent ete;
	
	public EyeTrackerEventPart(EyeTrackerEvent model) {
		super();
		setModel(model);
		ete = model;
	}

	@Override
	protected IFigure createFigure() {
			return ete.condition.draw(ete.current, ete.prev, ete.timetype);
	}

	@Override
	protected void createEditPolicies() {
		installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, null);

	}

	public EyeTrackerReplayableEvent getEvent() {
		return ete.current;
	}

}
